//package com.ruoyi.web.core.config;
//
//import com.ruoyi.by.health.domain.entity.ByhealthEmployee;
//import com.ruoyi.by.health.domain.entity.ByhealthPlaybill;
//import com.ruoyi.by.health.service.IByhealthEmployeeService;
//import com.ruoyi.by.health.service.IByhealthPlaybillService;
//import org.apache.commons.collections.CollectionUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.data.redis.core.ZSetOperations;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.util.List;
//
//@Component
//public class PlayBillInitConfig {
//    @Autowired
//    IByhealthPlaybillService playbillService;
//    @Autowired
//    RedisTemplate<String, Object> redisTemplate;
//    private static final Logger log = LoggerFactory.getLogger(PlayBillInitConfig.class);
//    //所有城市
///*    private static List<PubListVo> allCity = new ArrayList<>();
//    private static List<SysCityDO> allCityList = new ArrayList<>();*/
//
//    /**
//     * 初始化省市县
//     */
//    @PostConstruct
//    public void initGameScoreRegion() {
//
//        log.info("----开始初始化员工游戏排名到redis-----");
//        ByhealthPlaybill playbillQo = new ByhealthPlaybill();
//
//        List<ByhealthPlaybill> playbillList = playbillService.selectPlaybillList(playbillQo);
//        ZSetOperations<String,Object> zSetOperations = redisTemplate.opsForZSet();
//        if(!CollectionUtils.isEmpty(playbillList)){
//            for (ByhealthPlaybill playbill:playbillList){
//                zSetOperations.add("play_bill_score",playbill.getId(),playbill.getPlayScore());
//            }
//        }
//        log.info("----初始化员工游戏排名到redis完成-----");
//    }
//
//}
